Rust: add invoke-agent example in bedrock-agent-runtime#7479
Merged
Conversation
Contributor
|
Hi @mattiapitossi , thanks for contributing. The code looks good, but the test cases are missing for this code piece. You can refer this jsv3 PR of invoke-agent which has tests. PR Link: #6129 |
Contributor
Author
|
Hi @tejasgn1, thanks for the feedback. I had to refactor a bit the code to make it unit-testable as it's a bit a difficult to mock directly the completion field of the EventReceiver result, so I directly mock the recv to make the test as close as possible to the one written in JS. Let me know what do you think, thanks! Test demo:
|
Contributor
Author
tejasgn1
approved these changes
Jun 24, 2025
tejasgn1
left a comment
Contributor
There was a problem hiding this comment.
The invoke-agent example code for Rust now looks good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Hi there,
This pull request adds an example to use the invoke agent command in Rust:
Let me know if it makes sense for you.
Thanks!
command:
cargo run --bin invoke-agentcloses #7480
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.